//
//  TestAlertViewController.h
//  MKUITestApp
//
//  Created by 苏尚进 on 2023/11/1.
//  Copyright © 2023 moon. All rights reserved.
//

#import "ViewControllerBase.h"
#import "ListViewController.h"
#import <MKUI/MKUI.h>
NS_ASSUME_NONNULL_BEGIN

@interface MKUIAlertAction(Test)
- (NSString *)testDescription;
- (NSDictionary *)testJsonValue;
+ (MKUIAlertAction *)actionWithTestJsonValue;
@end

@interface TestAlertViewController : MKUIExtendTabBarController
@property(nonatomic,readonly,class) MKTFuncItem *funcItem;
@end
@interface TestMKUIAlertViewParam : ListViewController
@property(nonatomic,assign) MKUIAlertViewStyle alertPreferredStyle;
@property(nonatomic,strong) NSString *alertTitle;
@property(nonatomic,strong) NSString *alertMessage;
@property(nonatomic,assign) NSInteger alertDuration;
@property(nonatomic,strong) NSMutableArray<MKUIAlertAction *> *alertActions;
@property(nonatomic,assign) BOOL enableActions;
@property(nonatomic,assign) BOOL showMaskView;
@property(nonatomic,assign) BOOL alertInShareWindow;
@property(nonatomic,assign) CGFloat maxHeight;
- (MKUIAlertController *)genAlertController;
- (MKUIAlertView *)genAlertView;
@end

@interface TestUIAlertControllerParam : ListViewController
@property(nonatomic,assign) UIAlertControllerStyle alertPreferredStyle;
@property(nonatomic,strong) NSString *alertTitle;
@property(nonatomic,strong) NSString *alertMessage;
@property(nonatomic,assign) NSInteger alertDuration;
@property(nonatomic,strong) NSMutableArray<UIAlertAction *> *alertActions;
@property(nonatomic,assign) BOOL enableActions;
@end

@interface TestMultipAlertParam : ListViewController

@end

//带有倒计时功能的按钮。
@interface TestMKUIAlertAction_Close : MKUIAlertAction
@property(nonatomic,assign) NSTimeInterval duration;//倒计时时间，单位秒。时间没到之前，不可点击
@property(nonatomic,copy,nullable) void(^whenTimerFinish)(TestMKUIAlertAction_Close *ation);//倒计时结束回调
@property(nonatomic,copy,nullable) NSString *(^titleBlock)(TestMKUIAlertAction_Close *ation,NSString *title,NSTimeInterval duration);//返回倒计时中，action的title值
- (void)beginTimer;//开始倒计时
- (void)endTimer;
@end

@interface TestMKUIAlertActionView_Button : MKUIAlertActionView
@property(nonatomic,strong) MKUIFlowLayoutButton *button;
@end

@interface TestMKUIAlertViewBackground : UIView
@property(nonatomic,strong) UIView *bgView;
@property(nonatomic,strong) UIImageView *iconView;
@end
NS_ASSUME_NONNULL_END
